package cn.edu.swu.mys;

public class StudentMain {  // 改为不同的类名，避免冲突
    public static void main(String[] args) {  // 改为小写 main
        //创建对象：
        Student stu1 = new Student("20250001", "Mike", "male", 20);
        Student stu2 = new Student("20250002", "Jane", "female", 19);

        Course course1 = new Course("A001", "Java Programming", "Mr. Wang");
        Course course2 = new Course("A002", "Database Principles", "Ms. Li");

        //使用setter方法，修改其中一个学生的年龄和一门课程的任课教师:
        stu1.setAge(21); // 修改学生1的年龄
        course2.setTeacher("Ms.Liu");// 修改课程2的任课教师

        //showInfo()方法，将信息打印到控制台:
        System.out.println("=================");
        stu1.showInfo();
        stu2.showInfo();

        course1.showInfo();
        course2.showInfo();
    }
}